home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / checkIPServer / RCS / checkIPServer,v < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.4 KB  |  74 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @# @;
  7.  
  8.  
  9. 1.2
  10. date     90.11.12.17.44.41;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     90.11.09.14.08.53;  author kupfer;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Script to check a host's IP server and restart it if necessary.
  22. Originally /hosts/allspice/checkIPServer.
  23. @
  24.  
  25.  
  26. 1.2
  27. log
  28. @restartIPServer is now in /sprite/admin.$MACHINE.
  29. @
  30. text
  31. @#!/bin/csh -f
  32. #
  33. # checkIPServer: Script to check up on a hosts ipServer, and restart
  34. # it if needed.
  35. #
  36. # $Header: /sprite/src/admin/checkIPServer/RCS/checkIPServer,v 1.1 90/11/09 14:08:53 kupfer Exp Locker: kupfer $
  37.  
  38. # See if it's in the debugger.
  39. set pid=`ps -ad | egrep ipServer | awk '{print $1}'`
  40. if (X$pid == "X") then
  41. # See if it went away completely.
  42.     set pid=`ps -a | egrep ipServer | sed '/egrep/d' | awk '{print $1}'`
  43.     if (X$pid != "X") then
  44.         exit
  45.     endif
  46. endif
  47.  
  48. echo "IPSERVER found DEAD at `date`" > /dev/syslog
  49. set host=`hostname`
  50. if (-e /hosts/$host/restartIPServer) then
  51.     /hosts/$host/restartIPServer >& /dev/syslog
  52. else
  53.     /sprite/admin.$MACHINE/restartIPServer >& /dev/syslog
  54. endif
  55.  
  56. if ($#argv > 0) then
  57.     echo "IPServer on $host died and was restarted" | mail spriters
  58. endif
  59. @
  60.  
  61.  
  62. 1.1
  63. log
  64. @Initial revision
  65. @
  66. text
  67. @d6 1
  68. a6 1
  69. # $Header: /hosts/allspice.Berkeley.EDU/RCS/checkIPServer,v 1.2 90/10/17 12:32:34 kupfer Exp $
  70. d23 1
  71. a23 1
  72.     /sprite/admin/scripts/restartIPServer >& /dev/syslog
  73. @
  74.